import http from './http'

const MODULE_PREFIX = '/u/school'

export const getAllColleges = () => {
  return http.get(`${MODULE_PREFIX}/all-colleges`)
}

export const getAllMajors = () => {
  return http.get(`${MODULE_PREFIX}/all-majors`)
}

export const getAllClasses = () => {
  return http.get(`${MODULE_PREFIX}/all-classes`)
}

export const getColleges = (year) => {
  return http.get(`${MODULE_PREFIX}/colleges`, { params: { year } })
}

export const getMajors = (collegeCode, year) => {
  return http.get(`${MODULE_PREFIX}/majors`, { params: { collegeCode, year } })
}

export const getClasses = (collegeCode, year) => {
  return http.get(`${MODULE_PREFIX}/classes`, { params: { collegeCode, year } })
} 